<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta
            name="viewport"
            content="width=device-width, initial-scale=1, shrink-to-fit=no"
    />
    <title th:text="#{login.page.title}"></title>
    <link
            rel="stylesheet"
            type="text/css"
            href="/webjars/bootstrap/css/bootstrap.min.css"
            th:href="@{/webjars/bootstrap/css/bootstrap.min.css}"
    />
</head>
<body>
<div class="container">
    <form name="f" th:action="@{/login}" method="post">
        <div
                th:if="${param.error}"
                class="alert alert-danger"
                th:text="#{login.page.bad-credential}"
        >
            Invalid username and password.
        </div>
        <div
                th:if="${param.logout}"
                class="alert alert-success"
                th:text="#{login.page.logout.msg}"
        >
            You have been logged out.
        </div>
        <div class="form-group">
            <label for="username" th:text="#{login.page.form.username}"
            >Username:</label
            >
            <input
                    type="text"
                    class="form-control"
                    id="username"
                    name="username"
            />
        </div>
        <div class="form-group">
            <label for="password" th:text="#{login.page.form.password}"
            >Password:</label
            >
            <input
                    type="password"
                    class="form-control"
                    id="password"
                    name="password"
            />
        </div>
        <div class="form-check">
            <input
                    type="checkbox"
                    class="form-check-input"
                    id="remember-me"
                    name="remember-me"
            />
            <label class="form-check-label" for="remember-me" th:text="#{login.page.form.remember-me}"
            >Remember Me:</label
            >
        </div>
<!--        <input-->
<!--                type="hidden"-->
<!--                id="csrf_token"-->
<!--                th:name="${_csrf.parameterName}"-->
<!--                th:value="${_csrf.token}"-->
<!--        />-->
        <button
                type="submit"
                class="btn btn-primary"
                th:text="#{login.page.form.submit}"
        >
            Submit
        </button>
    </form>
</div>
<script src="/webjars/jquery/jquery.min.js" th:src="@{/webjars/jquery/jquery.min.js}"></script>
<script src="/webjars/bootstrap/js/bootstrap.min.js" th:src="@{/webjars/bootstrap/js/bootstrap.min.js}"></script>
</body>
</html>